<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('设备工艺记录详情')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="gray-bg">
    <div class="main-content">
        <form id="form-add" class="form-horizontal" th:object="${eqpProcessRecord}">
            <h4 class="form-header h4">设备工艺基本信息</h4>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label is-required">设备编号：</label>
                        <div class="col-sm-8">
                            <input name="equipmentId" th:field="*{equipmentId}" class="form-control" type="text" readonly>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label is-required">工艺名称：</label>
                        <div class="col-sm-8">
                            <input name="processName" th:field="*{processName}" class="form-control" type="text" readonly>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label is-required">设备维护日期：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <input name="maintainDate" class="form-control" th:field="*{maintainDate}" type="text" readonly>
<!--                                <span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label is-required">炉数：</label>
                        <div class="col-sm-8">
                            <input name="heatsNumber" class="form-control" type="text" th:field="*{heatsNumber}" readonly>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label is-required">程序名：</label>
                        <div class="col-sm-8">
                            <input name="programName" class="form-control" type="text" th:field="*{programName}" readonly>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">程序名备注：</label>
                        <div class="col-sm-8">
                            <input name="programRemark" class="form-control" type="text" th:field="*{programRemark}" readonly>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label is-required">累计厚度：</label>
                        <div class="col-sm-8">
                            <input name="accuThickness" class="form-control" type="text" th:field="*{accuThickness}" readonly>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label is-required">挡片累计使用次数：</label>
                        <div class="col-sm-8">
                            <input name="blankUsedTimes" class="form-control" type="text" th:field="*{blankUsedTimes}" readonly>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">备注：</label>
                        <div class="col-sm-8">
                            <input name="remark" class="form-control" th:field="*{remark}" type="text" readonly>
                        </div>
                    </div>
                </div>
            </div>
            <br />
            <br />
            <h4 class="form-header h4">激活温度950r20（激活后10+/3），未激活电阻规范15+/-5</h4>
            <div class="row">
                <div class="col-sm-12">
                    <div class="col-sm-12 select-table table-striped">
                        <table id="bootstrap-table1"></table>
                    </div>
                </div>
            </div>
            <br />
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">备注：</label>
                        <div class="col-sm-8">
                            <input name="tempResistanceRemark" class="form-control" th:field="*{tempResistanceRemark}" type="text" readonly>
                        </div>
                    </div>
                </div>
            </div>
            <br />
            <br />
            <h4 class="form-header h4">颗粒数</h4>
            <div class="row">
                <div class="col-sm-12">
                    <div class="col-sm-12 select-table table-striped">
                        <table id="bootstrap-table2"></table>
                    </div>
                </div>
            </div>
            <br />
            <br />
            <div class="row">
                <div class="col-sm-offset-5 col-sm-10">
                    <button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
                </div>
            </div>

        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "equipment/processrecord";
        $(function() {
            // 初始化数据, 可以由后台传过来
            var data1 = [[${eqpProcessRecord.processrecord}]];
            var columns1 = [
                {
                    checkbox: true
                },
                {
                    field: 'index',
                    align: 'center',
                    title: "序号",
                    width: 40,
                    formatter: function (value, row, index) {
                        return $.table.serialNumber(index);
                    }
                },
                {
                    field: 'eqpLotLocation',
                    align: 'center',
                    title: '位置',
                    width: 90
                },
                {
                    field: 'eqpLot',
                    align: 'center',
                    title: '卡号',
                    width: 250
                },
                {
                    field: 'eqpLocActiveUp',
                    align: 'center',
                    title: '（激活）上',
                    width: 90
                },
                {
                    field: 'eqpLocActiveMiddle',
                    align: 'center',
                    title: '中',
                    width: 90
                },
                {
                    field: 'eqpLocActiveDown',
                    align: 'center',
                    title: '下',
                    width: 90
                },
                {
                    field: 'eqpLocActiveLeft',
                    align: 'center',
                    title: '左',
                    width: 90
                },
                {
                    field: 'eqpLocActiveRight',
                    align: 'center',
                    title: '右',
                    width: 90
                },
                {
                    field: 'eqpLocActiveAverage',
                    align: 'center',
                    title: '平均值',
                    width: 90
                },
                {
                    field: 'eqpLocInActiveUp',
                    align: 'center',
                    title: '（未激活）上',
                    width: 90
                },
                {
                    field: 'eqpLocInActiveMiddle',
                    align: 'center',
                    title: '中',
                    width: 90
                },
                {
                    field: 'eqpLocInActiveDown',
                    align: 'center',
                    title: '下',
                    width: 90
                },
                {
                    field: 'eqpLocInActiveLeft',
                    align: 'center',
                    title: '左',
                    width: 90
                },
                {
                    field: 'eqpLocInActiveRight',
                    align: 'center',
                    title: '右',
                    width: 90
                },
                {
                    field: 'eqpLocInActiveAverage',
                    align: 'center',
                    title: '平均值',
                    width: 90
                }
            ];
            var options1 = {
                id: "bootstrap-table1",
                data: data1,
                pagination: false,
                showSearch: false,
                showRefresh: false,
                showToggle: false,
                showColumns: false,
                sidePagination: "client",
                columns: columns1
            };
            $.table.init(options1);
        });

        $(function() {
            var data2 = [[${eqpProcessRecord.locparam}]];
            var columns2 = [
                {
                    checkbox: true
                },
                {
                    field: 'index',
                    align: 'center',
                    title: "序号",
                    formatter: function (value, row, index) {
                        return $.table.serialNumber(index);
                    }
                },
                {
                    field: 'particleNumLocation',
                    align: 'center',
                    title: '颗粒数-位置'
                },
                {
                    field: 'particleNumBefore',
                    align: 'center',
                    title: '前值'
                },
                {
                    field: 'particleNumBack',
                    align: 'center',
                    title: '后值'
                },
                {
                    field: 'particleNumDvalue',
                    align: 'center',
                    title: '差值'
                }
            ];
            var options2 = {
                id: "bootstrap-table2",
                data: data2,
                pagination: false,
                showSearch: false,
                showRefresh: false,
                showToggle: false,
                showColumns: false,
                sidePagination: "client",
                columns: columns2
            };
            $.table.init(options2);
        });

    </script>
</body>
</html>